//
//  LLAudioNetworkDelegate.h
//  LLFoundation
//
//  Created by my_liu on 2016/11/14.
//  Copyright © 2016年 . All rights reserved.
//

#import <Foundation/Foundation.h>

@class LLAudioNetwork;

@protocol LLAudioNetworkDelegate <NSObject>

@required

/* 使用者必须通过这个将自己知道的返回结果格式成LLAudioModel对象，否则认定上传失败 */
- (LLAudioModel *)audioNetwork:(LLAudioNetwork *)audioNetwork formateUploadResult:(LLAudioModel *)baseResultModel formateDict:(NSDictionary *)formateDict;

@optional

/* 这个协议要返回正确的Audio对象，必须要实现上面的格式化方法 */
- (void)audioNetwork:(LLAudioNetwork *)audioNetwork finishUploadAudioFile:(LLAudioModel *)audioFile;

- (void)audioNetwork:(LLAudioNetwork *)audioNetwork finishDownloadWithAudioFile:(LLAudioModel *)audioFile;

- (void)audioNetwork:(LLAudioNetwork *)audioNetwork forAudioFile:(NSString *)audioFileLocalPath uploadFaild:(NSError *)error;

- (void)audioNetwork:(LLAudioNetwork *)audioNetwork forAudioFile:(NSString *)audioFileUnique downloadFaild:(NSError *)error;

- (void)audioNetwork:(LLAudioNetwork *)audioNetwork forAudioFile:(NSString *)audioFileLocalPath uploadProgress:(CGFloat)progress;

- (void)audioNetwork:(LLAudioNetwork *)audioNetwork forAudioFile:(NSString *)audioFileUnique downloadProgress:(CGFloat)progress;

@end
